Substantial evidence indicates that criminal justice populations are at disproportionately high risk for HIV infection from both injection drug use and unprotected sex. HIV testing and prevention have largely been ignored among community correction (i.e., probation and parole) populations. Despite the demonstrated link between criminal justice involvement and HIV risk behaviors and infection, little is known about the prevalence of HIV risk behaviors and infection among individuals on parole or probation. We propose to conduct both a randomized trial of HIV testing in community corrections, and a single arm intervention (cohort) study of linkage to HIV care for people with HIV recruited through community corrections (probation and parole). The first study is a two-group randomized controlled trial in which 6,000 male and female probationers and parolees in Baltimore City, Maryland and Providence, Rhode Island will be randomly assigned either to one of two treatment conditions: 1) On-site rapid testing conducted by research staff co-located for the purposes of this study at the probation/parole office; or 2) Off-site referral for rapid HIV testing at a community health center or HIV testing clinic. For the cohort study, all individuals identified at community corrections with HIV will be offered enrollment in a one year intervention study using Project Bridge to help improve linkage into HIV care. The rationale for choosing the two cities of Baltimore, MD and Providence, RI is due to the historically high rates of heroin addiction which is associated with multiple HIV-related risk behaviors and a high likelihood of being on probation and/or parole. Outcomes for the randomized trial will include: a) undergoing HIV testing; and b) receipt of HIV testing results. Outcomes for the cohort study will include: a) time to next (or first) appointment with their HIV provider; b) retention in HIV care, c) initiation of HAART medications for those positive for whom such medications are prescribed; and d) proportion of individuals achieving undetectable HIV plasma viral load over 12 months for those prescribed HAART.